package com.smartrm.globalinfrcore.cmd;

/*
 * @program: common-starters
 * @description: 命令执行者
 * @author: houhong
 * @create: 2023-01-11 21:22
 */
public interface CommandExecutor {

    public AbstractCommandContext getCommandContext();

    public void setCommandContext(AbstractCommandContext commandContext);

    /*
     * 执行命令，使用命令配置
     */
    <T> T execute(CommandConfig config, Command<T> command) throws Exception;

    /*
     * 执行命令，不带配置
     */
    <T> T execute(Command<T> command) throws Exception;
}